package com.yoku.user.event;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created by HODO on 2017/3/11.
 */
@Slf4j
@Component
public class TestListener {
    
    @Autowired
    EventBus eventBus;

    @PostConstruct
    public void init(){
        eventBus.register(this);
    }

    @Subscribe
    public void onLisener(Object object){
        log.info("=====================");
    }

}
